package service;

import org.springframework.stereotype.Service;

import com.alibaba.fastjson.JSONException;

import conpool.Pool;
import conpool.PoolManager;

/** 
 *  从c3p0获取连接信息
 *  @author juanbai
 */  
@Service
public class ConInfo {

	/** 
	 *  根据数据源名称获取连接池
	 *  @param filename 目标文件 
	 */  
	public Pool getPoolBySourceName(String sourceName) throws JSONException {
		return PoolManager.getInstance().getPoolByName(sourceName);
	}
	
}
